package Comparator;

import java.util.Comparator;

import packing.EmptySpaceDef;

public class EmptySpaceDefComparator implements Comparator<EmptySpaceDef> {

	@Override
	public int compare(EmptySpaceDef o1, EmptySpaceDef o2) {
		if(o1==EmptySpaceDef.MIN){
			if(o2 == EmptySpaceDef.MIN){
				return 0;
			}else if(o2==EmptySpaceDef.MED){
				return -1;
			}else{
				return -1;
			}
		}else if(o1==EmptySpaceDef.MAX){
			if(o2 == EmptySpaceDef.MIN){
				return 1;
			}else if(o2==EmptySpaceDef.MED){
				return -1;
			}else{
				return 0;
			}
		}else {
			if(o2 == EmptySpaceDef.MIN){
				return 1;
			}else if(o2==EmptySpaceDef.MED){
				return 0;
			}else{
				return 1;
			}
		}
		
	}

}
